package org.elsfs.cloud.module.ai.api.enums;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
@Getter
public enum StoreType {
    Milvus("milvus", "Milvus"),
    Chroma("2", "chroma"),
    ClickHouse("3", "clickhouse"),
    Coherence("4", "coherence"),
    DuckDB("5", "duckdb"),
    Elasticsearch("6", "elasticsearch"),
    Oracle("7", "oracle"),
    PGVector("pgvector", "pgvector"),
    Pinecone("9", "pinecone"),
    Qdrant("10", "qdrant"),
    Tablestore("11", "tablestore");
    private final String code;
    private final String name;

    public static StoreType getByCode(String code) {
        for (StoreType storeType : StoreType.values()) {
            if (storeType.getCode().equals(code)) {
                return storeType;
            }
        }
        return null;
    }
}
